home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / RCS / fsdm.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  19.0 KB  |  528 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.2 srv027:1.2 srv026:1.2 srv024:1.2 srv021:1.2 srv019:1.2 srv018:1.2 srv016:1.2 srv014:1.2 srv010:1.2 srv008:1.2 srv007:1.2 srv006:1.2 srv005:1.2 srv004:1.2 srv003:1.2 srv002:1.2 srv001:1.2;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     91.11.17.17.32.47;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     91.11.15.15.42.35;  author kupfer;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @Initial changes for sprited.
  27. @
  28. text
  29. @/* 
  30.  * fsdm.h --
  31.  *
  32.  *    Disk management module -- Definitions related to the storage of 
  33.  *    filesystems on a disk.
  34.  *
  35.  * Copyright 1990 Regents of the University of California
  36.  * Permission to use, copy, modify, and distribute this
  37.  * software and its documentation for any purpose and without
  38.  * fee is hereby granted, provided that the above copyright
  39.  * notice appear in all copies.  The University of California
  40.  * makes no representations about the suitability of this
  41.  * software for any purpose.  It is provided "as is" without
  42.  * express or implied warranty.
  43.  *
  44.  * $Header: /r3/kupfer/spriteserver/src/sprited/fsdm/RCS/fsdm.h,v 1.1 91/11/15 15:42:35 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  45.  */
  46.  
  47. #ifndef _FSDM
  48. #define _FSDM
  49.  
  50. #if defined(KERNEL) || defined(SPRITED)
  51. #include <dev.h>
  52. #include <fslcl.h>
  53. #include <fsioFile.h>
  54. #include <fscache.h>
  55. #else
  56. #include <kernel/dev.h>
  57. #endif
  58.  
  59. /*
  60.  * A disk is partitioned into domains that are managed separately.
  61.  * Each domain takes up an even number of cylinders.
  62.  * An array of Fsdm_DiskPartition's is kept on the disk to define how the
  63.  * disk is divided into domains.
  64.  *
  65.  * FSDM_NUM_DISK_PARTS defines how many different domains there could be
  66.  *    on a disk.  Generally, not all the domains are defined.  
  67.  */
  68. #define FSDM_NUM_DISK_PARTS    8
  69.  
  70. typedef struct Fsdm_DiskPartition {
  71.     int firstCylinder;    /* The first cylinder in the partition. */
  72.     int numCylinders;    /* The number of cylinders in the partition.  Set
  73.              * this to zero for unused partitions. */
  74. } Fsdm_DiskPartition;
  75.  
  76. /*
  77.  * The first few blocks of each domain are reserved.  They contain a copy
  78.  * of the Disk Header, a copy of the boot program, and finally Domain
  79.  * Header information.  The Disk Header defines the division of the disk's
  80.  * cylinders into domains,  and the layout of the rest of the reserved
  81.  * blocks.  The Disk Header is replicated on the zero'th sector of each
  82.  * domain. For the Sun implementation, the boot program is expected to
  83.  * start in sector #1. The boot program on
  84.  * the zero'th cylinder of the disk is used automatically, although other
  85.  * boot program locations can be specified manually.
  86.  *
  87.  */
  88.  
  89. #define FSDM_MAX_BOOT_SECTORS    128
  90. #define FSDM_BOOT_SECTOR_INC    16
  91.  
  92. typedef struct Fsdm_DiskHeader {
  93.     char asciiLabel[128];    /* Human readable string used for manufacturer's
  94.                  * model number and redudant geometry info */
  95.     /*
  96.      * Padding is used to shove the following data down so the check sum
  97.      * occurs at the end of the sector.  The 10 in the declaration indicates
  98.      * how may integer fields there are in this struct.
  99.      */
  100.     char pad[DEV_BYTES_PER_SECTOR - 128 -
  101.          (12 + FSDM_NUM_DISK_PARTS * 2) * sizeof(int)];
  102.     unsigned int magic;        /* Magic number used for consistency check */
  103.     int numCylinders;        /* The number of cylinders on the disk */
  104.     int numAltCylinders;    /* # of alternates used for bad blocks */
  105.     int numHeads;        /* # of surfaces on the disk */
  106.     int numSectors;        /* # of sectors per track */
  107.     int bootSector;        /* The starting sector of the boot program.
  108.                  * This is usually 1. */
  109.     int numBootSectors;        /* The number of sectors in the boot program.
  110.                  * This is usually 15. */
  111.     int summarySector;        /* Index of sector used for summary info */
  112.     int domainSector;        /* The sector where the domain header starts.*/
  113.     int numDomainSectors;    /* The number of sectors taken up by the
  114.                  * domain header */
  115.     int partition;        /* Index of the partition that this copy of
  116.                  * the Disk Header is on.  Each partition has
  117.                  * a copy of the Disk Header */
  118.     Fsdm_DiskPartition map[FSDM_NUM_DISK_PARTS];    /* Partition map */
  119.     int checkSum;        /* Checksum such that an XOR of all the ints
  120.                  * in the sector results in the same thing
  121.                  * as the magic number */
  122. } Fsdm_DiskHeader;
  123.  
  124. #define FSDM_DISK_MAGIC    (unsigned int)0xD15CFEBA    /* 'disk fever' */
  125.  
  126.  
  127.  
  128.  
  129. /*
  130.  * A File Descriptor is kept on disk for every file in a domain.  It
  131.  * contains administrative information and also the indexing structure
  132.  * used to access the file's data blocks.
  133.  */
  134.  
  135. #define FSDM_NUM_DIRECT_BLOCKS    10
  136. #define FSDM_NUM_INDIRECT_BLOCKS    3
  137. #define    FSDM_INDICES_PER_BLOCK    1024
  138.  
  139. #define FSDM_MAX_FILE_DESC_SIZE    128
  140. #define FSDM_FILE_DESC_PER_BLOCK    (FS_BLOCK_SIZE / FSDM_MAX_FILE_DESC_SIZE)
  141.  
  142. typedef struct Fsdm_FileDescriptor {
  143.     unsigned short magic;/* FSDM_FD_MAGIC, for disk consistency check */
  144.     short flags;    /* FSDM_FD_FREE, FSDM_FD_ALLOC, FSDM_FD_RESERVED */
  145.     short fileType;    /* FS_REGULAR, FS_DIRECTORY, FS_PIPE, FS_DEVICE,
  146.              * FS_SYMLINK, FS_RMTLINK */
  147.     short permissions;    /* 9 permission bits plus flags for set user ID
  148.              * upon execution */
  149.     int uid;        /* ID of owner */
  150.     int gid;        /* Group ID of owner */
  151.     int lastByte;    /* The number of bytes in the file */
  152.     int lastByteXtra;    /* (Some day we may have 64 bit sizes?) */
  153.     int firstByte;    /* For named pipes, offset of the first valid byte */
  154.     int userType;    /* Information about what sort of user file it is. */
  155.     int numLinks;    /* Number of directory references to the file */
  156.     int devServerID;    /* ID of the host that controls the device */
  157.     short devType;    /* For devices, their type.  For others this is the
  158.              * type of disk the file is stored on */
  159.     unsigned short devUnit;    /* For devices, their unit number.  For others,
  160.              * the unit indicates the disk partition */
  161.     /*
  162.      * All times in seconds since Jan 1 1970, Greenwich time.
  163.      */
  164.  
  165.     int createTime;    /* Time the file was created. */
  166.     int accessTime;    /* Time of last access.  This is not updated by
  167.              * directory traversals. */
  168.     int descModifyTime;    /* Time of last modification to the file descriptor */
  169.     int dataModifyTime;    /* Time of last modification to the file data */
  170.  
  171.     /*
  172.      * Pointers to the data blocks of the file.   The pointers are really
  173.      * indexes into the array of blocks stored in the data block section
  174.      * of a partition.  The direct array contains the indexes of the first
  175.      * several blocks of the files.  The indirect indexes are interpreted
  176.      * as follows.  The first indirect index is the index of a block that
  177.      * contains 1 K indexes of data blocks.  This is called a singly-indirect
  178.      * block.  The second indirect index is the index of a block that
  179.      * contains 1 K indexes of singly-indirect blocks.  This is called
  180.      * a doubly-indirect block.  Finally, the third indirect index is the index
  181.      * of a block that contains 1 K indexes of doubly-indirect blocks.
  182.      * Each data block contains 4Kbytes, so this indexing scheme supports
  183.      * files up to 40K + 4Meg + 4Gig + 4Pig bytes.
  184.      *
  185.      * The values of the direct and indirect indexes are indexes of
  186.      * fragments, ie. 1k pieces.  All the but the last index point to the
  187.      * beginning of a filesystem block, ie. 4K.  The last valid direct
  188.      * block may point to a fragment, and fragments can start on 1K
  189.      * boundaries.
  190.      */
  191.  
  192.     int direct[FSDM_NUM_DIRECT_BLOCKS];
  193.     int indirect[FSDM_NUM_INDIRECT_BLOCKS];
  194.     int numKbytes;    /* The number of KiloBytes acutally allocated towards
  195.              * the file on disk.  This accounts for fragments
  196.              * and indirect blocks. */
  197.     int version;    /* Version number of the handle for the file.  Needed
  198.              * on disk for recovery purposes (client re-open */
  199. } Fsdm_FileDescriptor;
  200.  
  201. /*
  202.  * Magic number and flag definitions for file descriptors.
  203.  *    FSDM_FD_FREE    The file descriptor is unused
  204.  *    FSDM_FD_ALLOC    The file descriptor is used for a file.
  205.  *    FSDM_FD_RESERVED The file descriptor is reserved and not for use.
  206.  *    FSDM_FD_DIRTY    The file descriptor has been modified since the
  207.  *            last time that it was written to disk.
  208.  *      FSDM_FD_PERMISSIONS_DIRTY  Premissions field (permissions) have be
  209.  *                    changed since the descriptor last written.
  210.  *      FSDM_FD_SIZE_DIRTY         Size fields (lastByte lastByteXtra,
  211.  *                   firstByte, numBlocks) have been changed
  212.  *                   size the descriptor was last written.
  213.  *      FSDM_FD_USERTYPE_DIRTY     The user type field has changed since the
  214.  *                   descriptor was last written.
  215.  *      FSDM_FD_LINKS_DIRTY         The number of links has changed since the
  216.  *                   descriptor was written.
  217.  *    FSDM_FD_ACCESSTIME_DIRTY   The access time has changed since the
  218.  *                   descriptor was written.
  219.  *    FSDM_FD_MODTIME_DIRTY       The modify time has changed since the
  220.  *                   descriptor was written.
  221.  *    FSDM_FD_INDEX_DIRTY       The file index fields (direct, indirect) 
  222.  *                   have changed since the descriptor was
  223.  *                   written.
  224.  *    FSDM_FD_VERSION_DIRTY       The file version number changed since the
  225.  *                   descriptor was written.
  226.  *    FSDM_FD_OTHERS_DIRTY       Some other (not listed above) field has
  227.  *                   changed since the descriptor was written.
  228.  *
  229.  */
  230.  
  231. #define FSDM_FD_MAGIC    (unsigned short)0xF1D0
  232. #define FSDM_FD_FREE    0x1
  233. #define FSDM_FD_ALLOC    0x2
  234. #define FSDM_FD_RESERVED    0x4
  235. #define FSDM_FD_DIRTY            0xFF8
  236. #define    FSDM_FD_PERMISSIONS_DIRTY   0x010    
  237. #define    FSDM_FD_SIZE_DIRTY        0x020
  238. #define    FSDM_FD_USERTYPE_DIRTY        0x040
  239. #define    FSDM_FD_LINKS_DIRTY        0x080
  240. #define    FSDM_FD_ACCESSTIME_DIRTY    0x100
  241. #define    FSDM_FD_MODTIME_DIRTY        0x200
  242. #define    FSDM_FD_INDEX_DIRTY        0x400
  243. #define    FSDM_FD_VERSION_DIRTY        0x800
  244. #define    FSDM_FD_OTHERS_DIRTY        0x008
  245.  
  246. /*
  247.  * The special index value FSDM_NIL_INDEX for direct[] and indirect[]
  248.  * means there is no block allocated for that index.
  249.  */ 
  250. #define FSDM_NIL_INDEX    -1
  251.  
  252. /*
  253.  * Types of indexing.  Order is important here because the indirect and
  254.  * double indirect types can be used to index into the indirect block 
  255.  * pointers in the file descriptor.
  256.  */
  257.  
  258. #define    FSDM_INDIRECT        0 
  259. #define    FSDM_DBL_INDIRECT        1
  260. #define    FSDM_DIRECT        2
  261.  
  262. /*
  263.  * The bad block file, the root directory of a domain and the lost and found 
  264.  * directory have well known file numbers.
  265.  */
  266. #define FSDM_BAD_BLOCK_FILE_NUMBER    1
  267. #define FSDM_ROOT_FILE_NUMBER        2
  268. #define FSDM_LOST_FOUND_FILE_NUMBER    3
  269.  
  270. /*
  271.  * Directry change log operations and flags.
  272.  *    Operations:
  273.  * FSDM_LOG_CREATE        Creating a new object in a directory.    
  274.  * FSDM_LOG_UNLINK        Unlinking an object from a directory.    
  275.  * FSDM_LOG_LINK        Linking to an existing object.    
  276.  * FSDM_LOG_RENAME_DELETE    Deleting an object as part of a rename.    
  277.  * FSDM_LOG_RENAME_LINK        Linking to an object as part of a rename.
  278.  * FSDM_LOG_RENAME_UNLINK    Unlinking an object as part of a rename.
  279.  * FSDM_LOG_OP_MASK        Mask out the log operation.
  280.  * 
  281.  * Flags:
  282.  *
  283.  * FSDM_LOG_START_ENTRY        Start of change entry
  284.  * FSDM_LOG_END_ENTRY        End of change entry
  285.  * FSDM_LOG_STILL_OPEN        File is still open after last unlink.
  286.  * FSDM_LOG_IS_DIRECTORY    File is a directory.
  287.  */
  288.  
  289. #define    FSDM_LOG_CREATE        1
  290. #define    FSDM_LOG_UNLINK        2
  291. #define    FSDM_LOG_LINK        3
  292. #define    FSDM_LOG_RENAME_DELETE    4
  293. #define    FSDM_LOG_RENAME_LINK    5
  294. #define    FSDM_LOG_RENAME_UNLINK    6
  295. #define    FSDM_LOG_OP_MASK    0xff
  296.  
  297. #define    FSDM_LOG_START_ENTRY    0x100
  298. #define    FSDM_LOG_END_ENTRY    0x200
  299. #define    FSDM_LOG_STILL_OPEN    0x1000
  300. #define FSDM_LOG_IS_DIRECTORY    0x2000
  301.  
  302. #ifdef KERNEL
  303. /*
  304.  * Structure for each domain.
  305.  */
  306.  
  307. typedef struct Fsdm_Domain {
  308.     char    *domainPrefix;      /* Prefix of this domain. */
  309.     int        domainNumber;       /* Number of this domain. */
  310.     int        flags;          /* Flags defined below. */        
  311.     int        refCount;      /* Number of active users of the domain. */
  312.     Sync_Condition condition;      /* Condition to wait on. */
  313.     Fscache_Backend *backendPtr;  /* Cache backend for this domain. */
  314.     struct Fsdm_DomainOps *domainOpsPtr;
  315.                   /* Domain specific data and routines. */
  316.     ClientData    clientData;      /* Domain specific info. */
  317. } Fsdm_Domain;
  318. /*
  319.  * Structure defining the domain specific routines and data.
  320.  */
  321. typedef struct Fsdm_DomainOps {
  322.     ReturnStatus (*attachDisk) _ARGS_((Fs_Device *devicePtr, 
  323.                     char *localName, int flags, 
  324.                     int *domainNumPtr));
  325.                      /* Attach and install the domain from 
  326.                       * the specified disk partition. */
  327.     ReturnStatus (*detachDisk) _ARGS_((Fsdm_Domain *domainPtr));
  328.                      /* Detach  the domain from 
  329.                       * the specified disk partition. */
  330.     ReturnStatus (*writeBack) _ARGS_((Fsdm_Domain *domainPtr, 
  331.                       Boolean shutdown));   
  332.                      /* Writeback the internal data structures
  333.                       * for the specified domain. */
  334.     ReturnStatus (*rereadSummary) _ARGS_((Fsdm_Domain *domainPtr));
  335.                     /* Reread the domain info from disk. */
  336.  
  337.     ReturnStatus (*domainInfo) _ARGS_ ((Fsdm_Domain *domainPtr, 
  338.                 Fs_DomainInfo *domainInfoPtr));
  339.                      /* Return a Fs_DomainInfo for the 
  340.                       * specified domain.  */
  341.     ReturnStatus (*blockAlloc) _ARGS_((Fsdm_Domain *domainPtr, 
  342.                       Fsio_FileIOHandle *handlePtr, int offset,
  343.                       int numBytes, int flags, 
  344.                       int *blockAddrPtr, Boolean *newBlockPtr));
  345.                     /* Allocate a block for a file. */
  346.     ReturnStatus (*getNewFileNumber) _ARGS_((Fsdm_Domain *domainPtr, 
  347.                         int dirFileNum, 
  348.                         int *fileNumberPtr));
  349.  
  350.                     /* Allocate a file number of a new
  351.                      * file.  */
  352.     ReturnStatus (*freeFileNumber)  _ARGS_((Fsdm_Domain *domainPtr, 
  353.                         int fileNumber));
  354.                     /* Deallocate a file number. */
  355.  
  356.     ReturnStatus (*fileDescInit) _ARGS_((Fsdm_Domain *domainPtr, 
  357.                     int fileNumber, int type, 
  358.                     int permissions, int uid, int gid, 
  359.                     Fsdm_FileDescriptor *fileDescPtr));
  360.                      /* Initialize a new file descriptor. */
  361.  
  362.     ReturnStatus (*fileDescFetch)  _ARGS_((Fsdm_Domain *domainPtr, 
  363.                        int fileNumber, 
  364.                        Fsdm_FileDescriptor *fileDescPtr));
  365.                      /* Fetch a file descriptor from disk. */
  366.  
  367.     ReturnStatus (*fileDescStore)  _ARGS_((Fsdm_Domain *domainPtr, 
  368.                        Fsio_FileIOHandle *handlePtr, 
  369.                        int fileNumber, 
  370.                        Fsdm_FileDescriptor *fileDescPtr,
  371.                        Boolean forceOut));
  372.                      /* Store a file descriptor back into it's
  373.                       * disk block. */
  374.     ReturnStatus (*fileBlockRead) _ARGS_((Fsdm_Domain *domainPtr, 
  375.                      Fsio_FileIOHandle *handlePtr, 
  376.                      Fscache_Block *blockPtr));
  377.  
  378.     ReturnStatus (*fileBlockWrite) _ARGS_((Fsdm_Domain *domainPtr, 
  379.                        Fsio_FileIOHandle *handlePtr,
  380.                        Fscache_Block *blockPtr));
  381.  
  382.     ReturnStatus (*fileTrunc)  _ARGS_((Fsdm_Domain *domainPtr, 
  383.                     Fsio_FileIOHandle *handlePtr, 
  384.                     int size, Boolean delete));
  385.                      /* Truncate the file to the specifed 
  386.                       * length. */
  387.     ClientData    (*dirOpStart) _ARGS_((Fsdm_Domain *domainPtr, int opFlags,
  388.                 char *name, int nameLen, int fileNumber, 
  389.                 Fsdm_FileDescriptor *fileDescPtr, 
  390.                 int dirFileNumber, int dirOffset, 
  391.                 Fsdm_FileDescriptor *dirFileDescPtr));
  392.                      /* Directory operation start. */    
  393.  
  394.     void    (*dirOpEnd) _ARGS_((Fsdm_Domain *domainPtr,
  395.                     ClientData clientData, ReturnStatus status,
  396.                     int opFlags, char *name, int nameLen,
  397.                     int fileNumber, 
  398.                     Fsdm_FileDescriptor *fileDescPtr, 
  399.                     int dirFileNumber,    int dirOffset, 
  400.                     Fsdm_FileDescriptor *dirFileDescPtr));   
  401.                      /* Directory operation end. */    
  402.  
  403. } Fsdm_DomainOps;
  404.  
  405.  
  406.  
  407. /*
  408.  * Domain flags used for two stage process of detaching a domain:
  409.  *
  410.  *    FSDM_DOMAIN_GOING_DOWN    This domain is being detached.
  411.  *    FSDM_DOMAIN_DOWN        The domain is detached.
  412.  *    FSDM_DOMAIN_ATTACH_BOOT   The domain was attached by the kernel
  413.  *                during boot.
  414.  */
  415. #define    FSDM_DOMAIN_GOING_DOWN    0x1
  416. #define    FSDM_DOMAIN_DOWN         0x2
  417. #define FSDM_DOMAIN_ATTACH_BOOT        0x4
  418.  
  419.  
  420. /*
  421.  * Whether or not to keep information about file I/O by user file type.
  422.  */
  423. extern Boolean fsdmKeepTypeInfo;
  424.  
  425.  
  426.  
  427.  
  428. /*
  429.  * Declarations for the file descriptor allocation routines.
  430.  */
  431. extern ReturnStatus Fsdm_FileDescInit _ARGS_((Fsdm_Domain *domainPtr, 
  432.         int fileNumber, int type, int permissions, int uid, int gid, 
  433.         Fsdm_FileDescriptor *fileDescPtr));
  434. extern ReturnStatus Fsdm_FileDescFetch _ARGS_((Fsdm_Domain *domainPtr, 
  435.         int fileNumber, Fsdm_FileDescriptor *fileDescPtr));
  436. extern ReturnStatus Fsdm_FileDescStore _ARGS_((Fsio_FileIOHandle *handlePtr,
  437.         Boolean forceOut));
  438.  
  439. extern ReturnStatus Fsdm_GetNewFileNumber _ARGS_((Fsdm_Domain *domainPtr, 
  440.         int dirFileNum, int *fileNumberPtr));
  441. extern ReturnStatus Fsdm_FreeFileNumber _ARGS_((Fsdm_Domain *domainPtr, 
  442.         int fileNumber));
  443. extern ReturnStatus Fsdm_FileDescWriteBack _ARGS_((Fsio_FileIOHandle *handlePtr,        Boolean doWriteBack));
  444. extern ReturnStatus Fsdm_FileTrunc _ARGS_((Fs_HandleHeader *hdrPtr, 
  445.         int size, Boolean delete));
  446. extern ReturnStatus Fsdm_BlockAllocate _ARGS_((Fs_HandleHeader *hdrPtr, 
  447.         int offset, int numBytes, int flags, int *blockAddrPtr, 
  448.         Boolean *newBlockPtr));
  449.  
  450.  
  451. extern ReturnStatus Fsdm_UpdateDescAttr _ARGS_((Fsio_FileIOHandle *handlePtr, 
  452.         Fscache_Attributes *attrPtr, int dirtyFlags));
  453.  
  454. /*
  455.  * Routines for attaching/detaching disk.
  456.  */
  457. extern ReturnStatus Fsdm_AttachDiskByHandle _ARGS_((
  458.         Fs_HandleHeader *ioHandlePtr, char *localName, int flags));
  459. extern ReturnStatus Fsdm_AttachDisk _ARGS_((Fs_Device *devicePtr, 
  460.         char *localName, int flags));
  461. extern ReturnStatus Fsdm_DetachDisk _ARGS_((char *prefixName));
  462.  
  463. /*
  464.  * Routines to manipulate domains.
  465.  */
  466. extern Fsdm_Domain *Fsdm_DomainFetch _ARGS_((int domain, Boolean dontStop));
  467. extern void Fsdm_DomainRelease _ARGS_((int domainNum));
  468. extern ReturnStatus Fsdm_InstallDomain _ARGS_((int domainNumber, 
  469.             int serverID, char *prefixName, int flags, 
  470.             Fsdm_Domain **domainPtrPtr));
  471. extern ReturnStatus Fsdm_DomainInfo _ARGS_((Fs_FileID *fileIDPtr, 
  472.             Fs_DomainInfo *domainInfoPtr));
  473. extern void Fsdm_DomainWriteBack _ARGS_((int domain, Boolean shutdown, 
  474.             Boolean detach));
  475. extern ReturnStatus Fsdm_RereadSummaryInfo _ARGS_((char *prefixName));
  476. extern ReturnStatus Fsdm_FileBlockRead _ARGS_((Fs_HandleHeader *hdrPtr,
  477.             Fscache_Block *blockPtr, 
  478.             Sync_RemoteWaiter *remoteWaitPtr));
  479. extern ReturnStatus Fsdm_FileBlockWrite _ARGS_((Fs_HandleHeader *hdrPtr, 
  480.             Fscache_Block *blockPtr, int flags));
  481.  
  482. /*
  483.  * Directory log routines.
  484.  */
  485. extern ClientData Fsdm_DirOpStart _ARGS_((int opFlags, 
  486.         Fsio_FileIOHandle *dirHandlePtr, int dirOffset, char *name, 
  487.         int nameLen, int fileNumber, int type, 
  488.         Fsdm_FileDescriptor *fileDescPtr));
  489. extern void Fsdm_DirOpEnd _ARGS_((int opFlags, Fsio_FileIOHandle *dirHandlePtr,
  490.         int dirOffset, char *name, int nameLen, int fileNumber,
  491.         int type, Fsdm_FileDescriptor *fileDescPtr,
  492.         ClientData clientData, ReturnStatus status));
  493.  
  494. /*
  495.  * Miscellaneous
  496.  */
  497. extern int Fsdm_FindFileType _ARGS_((Fscache_FileInfo *cacheInfoPtr));
  498. extern void Fsdm_Init _ARGS_((void));
  499. extern Boolean Fsdm_IsSunLabel _ARGS_((Address buffer));
  500. extern Boolean Fsdm_IsSpriteLabel _ARGS_((Address buffer));
  501. extern Boolean Fsdm_IsDecLabel _ARGS_((Address buffer));
  502. extern void Fsdm_RegisterDiskManager _ARGS_((char *typeName, 
  503.         ReturnStatus (*attachProc)(Fs_Device *devicePtr,
  504.                        char *localName, int flags, 
  505.                        int *domainNumPtr)));
  506.  
  507. #endif /* KERNEL || SPRITED */
  508.  
  509. #endif /* _FSDM */
  510. @
  511.  
  512.  
  513. 1.1
  514. log
  515. @Initial revision
  516. @
  517. text
  518. @d16 1
  519. a16 1
  520.  * $Header: /sprite/src/kernel/fsdm/RCS/fsdm.h,v 9.11 91/07/02 10:51:44 mendel Exp $ SPRITE (Berkeley)
  521. d22 1
  522. a22 1
  523. #ifdef KERNEL
  524. d479 1
  525. a479 1
  526. #endif /* KERNEL */
  527. @
  528.